import Vue from 'vue'
import VueAxios from 'vue-axios'
import Element from 'element-ui'
import axios from '@/router/axios'
import App from '@/App'
import router from '@/router/router'
import store from '@/store'
import i18n from '@/lang'
import 'element-ui/lib/theme-chalk/descriptions.css'
import 'element-ui/lib/theme-chalk/descriptions-item.css'
import 'element-ui/lib/theme-chalk/result.css'
import '@/styles/common.scss'
import '@/permission' // 权限
import '@/error' // 日志
import '@/cache' //页面缓存

import loadDeps, { i18nFormat } from '@/config/load-deps'
import CrudCommonMixin from '@/mixins/crud'

// 注册全局crud驱动
window.$crudCommon = CrudCommonMixin

Vue.use(router).use(VueAxios, axios).use(Element, { size: 'small', i18n: i18nFormat }).use(loadDeps)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
